%tr{ :bgcolor => color_row(story) }
  - if story.base.blank?
    %td{ :colspan => columns, :style => 'border-right: 1px solid #AAA' } &nbsp;
  - else
    %td{ :valign => 'top' }= color_text(story, :unique_id, "#{story.base.theme.code}#{story.base.unique_id}")
    %td{ :valign => 'top' }
      = color_text(story, :as_a, "As #{story.base.as_a}")
      %br
      = color_text(story, :i_want_to, "I want to #{story.base.i_want_to}")
      %br
      = color_text(story, :so_i_can, "So I can #{story.base.so_i_can}")
    %td.criteria{ :valign => 'top' }
      - story.acceptance_criteria.each_with_index do |criterion, index|
        - if !criterion.base.blank?
          = color_criterion(criterion, :criterion, "#{criterion.base.index_to_letters(index)}) #{criterion.base.criterion}")
          - if index < story.acceptance_criteria.count-1
            %br
    %td{ :valign => 'top' }= color_text(story, :comments, story.base.comments)
    - score_style = 'border-right: 1px solid #AAA' unless show_days
    - if use_50_90
      %td{ :valign => 'top' }= color_number(story, :score_50, :base, story.base.score_50)
      %td{ :valign => 'top', :style => score_style }= color_number(story, :score_90, :base, story.base.score_90)
    - else
      %td{ :valign => 'top', :style => score_style }= color_number(story, :score, :base, story.base.score)
    - if show_costs
      %td{ :valign => 'top' }= color_number(story, :cost_formatted, :base, story.base.cost_formatted)
    - if show_days
      %td{ :style => 'border-right: 1px solid #AAA', :valign => 'top' }= color_number(story, :days_formatted, :base, story.base.days_formatted)
  - if story.target.blank?
    %td{ :colspan => columns} &nbsp;
  - else
    %td{ :valign => 'top' }= color_text(story, :unique_id, "#{story.target.theme.code}#{story.target.unique_id}")
    %td{ :valign => 'top' }
      = color_text(story, :as_a, "As #{story.target.as_a}")
      %br
      = color_text(story, :i_want_to, "I want to #{story.target.i_want_to}")
      %br
      = color_text(story, :so_i_can, "So I can #{story.target.so_i_can}")
    %td.criteria{ :valign => 'top' }
      - story.acceptance_criteria.each_with_index do |criterion, index|
        - if !criterion.target.blank?
          = color_criterion(criterion, :criterion, "#{criterion.target.index_to_letters(index)}) #{criterion.target.criterion}")
          - if index < story.acceptance_criteria.count-1
            %br
    %td{ :valign => 'top' }= color_text(story, :comments, story.target.comments)
    - score_style = 'border-right: 1px solid #AAA' unless show_days
    - if use_50_90
      %td{ :valign => 'top' }= color_number(story, :score_50, :target, story.target.score_50)
      %td{ :valign => 'top' }= color_number(story, :score_90, :target, story.target.score_90)
    - else
      %td{ :valign => 'top' }= color_number(story, :score, :target, story.target.score)
    - if show_costs
      %td{ :valign => 'top' }= color_number(story, :cost_formatted, :target, story.target.cost_formatted)
    - if show_days
      %td{ :valign => 'top' }= color_number(story, :days_formatted, :target, story.target.days_formatted)
